<a href="<?=$this->url(array('controller' => 'location', 'action' => 'edit', 'addnew' => 1))?>"><?=$this->translate('Добавить район')?></a><br />

<form method="get" action="<?=$this->url(array('action' => 'index'))?>">
	<?=$this->translate('Страна')?>: <?=$this->formSelect('country', $this->country, array('onchange' => 'this.form.submit();'), $this->countries);?>
</form>

<form method="get" action="<?=$this->url(array('action' => 'index'))?>"<?=$this->country == 0 ? ' style="display: none;"' : ''?>>
	<?=$this->translate('Регион')?>: <?=$this->formSelect('region', $this->region, array('onchange' => 'this.form.submit();'), $this->regions);?>
</form>

<form method="get" action="<?=$this->url(array('action' => 'index'))?>"<?=(($this->region == 0)) ? ' style="display: none;"' : ''?>>
	<?=$this->translate('Город')?>: <?=$this->formSelect('city', $this->city, array('onchange' => 'this.form.submit();'), $this->cities);?>
</form>

<?php if (sizeof($this->locations) > 0) { ?>
<table border="1">
	<?php $i=1; foreach ($this->locations as $k => $v) { ?>
		<tr>
			<td><?=$i++?></td>
			<td><a href="<?=$this->url(array('action' => 'edit', 'id' => $k))?>"><?=$v['Name']?> (<?=$v['ID']?>)</a></td>
			<td><?=$v['active'] == 0 ? $this->translate('Неактивная') : $this->translate('Активная')?></td>
			<td><div id="<?=$v['ID']?>" class="del_ot" rel="<?=$v['Name']?>" ><img src="<?=HTTP_HOST; ?>/images/controll/del.png" alt="" style="position: relative; float: left; cursor: pointer; width: 20px; height: 20px; border: solid 1px;"/></div></td>
		</tr>
	<?php } ?>
</table>
<?php } ?>